#include <Road.h>
Public Member Functions | |
| RoadMap (osg::ref_ptr< osg::Group > sgroot) | |
| void | addRoadMaptoRoot (osg::ref_ptr< osg::Group > sgroot, int flag) |
| void | loadRoadScene (void) |
| osg::Vec3d | getpt (const int np) |
| osg::Group * | makedelaunay () |
| void | addNewRoad (RoadType type) |
| void | addPoint (osg::Vec3 position) |
| void | setActiveRoadIndex (int index) |
| int | getActiveRoadIndex (void) |
| int | getLastRoadIndex () |
| void | pinControl (osg::ref_ptr< osg::Group > sgroot) |
| void | clearRoadMap () |
| osg::ref_ptr< osg::Group > | returnRoadNode () |
| void | addRoadNode (osg::ref_ptr< osg::Node > roadNodeToBeAdded) |
Private Attributes | |
| vector< Road * > | roadMap |
| int | currentRoadIndex |
| int | lastRoadIndex |
| int | pinFlag |
| osg::Vec3Array * | points |
| osg::ref_ptr< osg::Group > | roadRoot |
| osg::ref_ptr< osg::Group > | dotRootNode |
| osg::ref_ptr< osg::Group > | lineRootNode |
| osg::ref_ptr< osg::Group > | linedotRoot |
| osg::ref_ptr< osg::Group > | savedMap |
Friends | |
| class | Road |
Definition at line 141 of file Road.h.
|
|
constructor takes the root as argument it adds 2 elements to this root. one is for the dots&lines (linedotRoot) the other is for the plane geometry which contains points that also includes roads.(roadRoot) initially the dots and lines are displayed.
Definition at line 252 of file Road.cpp. References currentRoadIndex, dotRootNode, lastRoadIndex, linedotRoot, lineRootNode, pinFlag, and roadRoot. |
|
|
add a new Road with the type specified, to the roadMap vector of the theRoadMap object this function also adds the new Road's dotRoot an dlineRoot to dotRootNode and lineRootNode respectively
Definition at line 277 of file Road.cpp. References dotRootNode, lastRoadIndex, lineRootNode, Road, and roadMap. Referenced by RoadForm::OnBnClickedButton10(), RoadForm::OnBnClickedButton5(), RoadForm::OnBnClickedButton6(), and RoadForm::OnBnClickedButton7(). |
|
|
adds the specified point to the current Road Object
Definition at line 286 of file Road.cpp. References currentRoadIndex, and roadMap. Referenced by OSGEventHandler::roadPick(). |
|
||||||||||||
|
adds the RoadMap to the root given as first argument. if the second argument is a 1 then the dots and line's geode is also added to the tree.
Definition at line 270 of file Road.cpp. References linedotRoot, and roadRoot. |
|
|
needed for file operations the argument is made the new RoadMap
Definition at line 306 of file Road.cpp. References roadRoot. Referenced by FileHandler::loadRoadMap(). |
|
|
clears all the roads from the map Definition at line 315 of file Road.cpp. References currentRoadIndex, dotRootNode, lastRoadIndex, lineRootNode, makedelaunay(), roadMap, and roadRoot. Referenced by RoadForm::OnBnClickedButton10(). |
|
|
get active Road index
Definition at line 296 of file Road.cpp. References currentRoadIndex. |
|
|
Definition at line 301 of file Road.cpp. References lastRoadIndex. Referenced by OSGEventHandler::roadPick(). |
|
|
fills the points array initally for a constructing the ground Definition at line 204 of file Road.cpp. Referenced by makedelaunay(). |
|
|
this function should be called whenever the texturized environment is needed. it changes the children of the roadRoot with the new scene. Definition at line 234 of file Road.cpp. References makedelaunay(), and roadRoot. Referenced by RoadForm::OnBnClickedButton9(), and RightView::SetSceneData(). |
|
|
this function forms the actual texturized environment added to the scene. the lines of splines are turned into texturized road pieces and placed in the plane.
Definition at line 341 of file Road.cpp. References getpt(), and points. Referenced by clearRoadMap(), and loadRoadScene(). |
|
|
this function removes the dots and lines in the environment from the tree according to the pinFlag's condition. if the flag is 0 meaning the dots and lines are not shown then it becomes one and the linedotRoot is added to the the tree else if the flag is 1, it is made 0 by this function and the linedotRoot is removed from the tree
Definition at line 219 of file Road.cpp. References linedotRoot, and pinFlag. Referenced by RoadForm::OnBnClickedButton10(). |
|
|
returns the RoadMap as a Group Definition at line 230 of file Road.h. References roadRoot. Referenced by FileHandler::saveRoadMap(). |
|
|
Set active road index
Definition at line 291 of file Road.cpp. References currentRoadIndex. Referenced by OSGEventHandler::roadPick(). |
|
|
Definition at line 143 of file Road.h. Referenced by addNewRoad(). |
|
|
the active Road index Definition at line 250 of file Road.h. Referenced by addPoint(), clearRoadMap(), getActiveRoadIndex(), RoadMap(), and setActiveRoadIndex(). |
|
|
all Road's dotRoot groups are added to this group Definition at line 276 of file Road.h. Referenced by addNewRoad(), clearRoadMap(), and RoadMap(). |
|
|
the lastly added Road index Definition at line 255 of file Road.h. Referenced by addNewRoad(), clearRoadMap(), getLastRoadIndex(), and RoadMap(). |
|
|
dotRootNode and lineRootNode is added to this group and this group is added to the root provided in the initialization in the constructor of RoadMap Definition at line 287 of file Road.h. Referenced by addRoadMaptoRoot(), pinControl(), and RoadMap(). |
|
|
all Road's lineRoot groups are added to this group Definition at line 281 of file Road.h. Referenced by addNewRoad(), clearRoadMap(), and RoadMap(). |
|
|
the flag for control of the pins and lines Definition at line 260 of file Road.h. Referenced by pinControl(), and RoadMap(). |
|
|
the plane's points Definition at line 265 of file Road.h. Referenced by makedelaunay(). |
|
|
the added Road objects kept int this vector Definition at line 245 of file Road.h. Referenced by addNewRoad(), addPoint(), and clearRoadMap(). |
|
|
makedelaunay function adds the node containing the goede that involves points with texturing Definition at line 271 of file Road.h. Referenced by addRoadMaptoRoot(), addRoadNode(), clearRoadMap(), loadRoadScene(), returnRoadNode(), and RoadMap(). |
|
|
holding the previously saved osg models. in each save operation the road structure is added to this root as a child. |
1.4.6-NO